package com.gitee.l0km.thrift.swift2thrift.generator;

import java.util.Map;

import com.beust.jcommander.Parameter;
import com.facebook.swift.generator.swift2thrift.Swift2ThriftGeneratorCommandLineConfig;

/**
 * 增加 {@code primitiveOptional}命令行参数
 * @author guyadong
 *
 */
public class Swift2ThriftGeneratorCommandLineConfigCustom extends Swift2ThriftGeneratorCommandLineConfig {

	public Swift2ThriftGeneratorCommandLineConfigCustom() {
	}
    @Parameter(names = "-primitiveOptional", description =
            "Generate optional field and parameter  from the  wrap type of primitive type(such as Integer,Long...) ")
    public boolean primitiveOptional = true;
    @Parameter(names = "-objectOptional", description =
            "Generate optional field and parameter  from all Object type of not primitive type ")
    public boolean objectOptional = false;
    @Parameter(names = "-excludeMethods", description =
            "Method names list  separated by comma or semicolon that excluded from interface")
    public String excludeMethods = null;
    @Parameter(names = "-includeMethods", description =
            "Method names list  separated by comma or semicolon that included in interface")
    public String includeMethods = null;
    @Parameter(names = "-sortByInclude", description =
            "sort declared methods by includeMethods")
    public boolean sortByInclude = false;
    @Parameter(names = "-erpc", description =
    		"Generate eRPC IDL file")
    public boolean generateErpcIDL = false;
    @Parameter(names = "-erpcProgramName", description =
            "name of erpc program")
    public String programName = "";
    @Parameter(names = "-erpcPortPrefix", description =
            "prefix of port method for eRPC")
    public String portPrefix;
    @Parameter(names = "-sourcepath", description =
            "path list of source separated by semicolon for reading comments by javadoc")
	public String sourcepath;
    @Parameter(names = "-classpath", description =
            "Specifies the paths where javadoc will look for referenced classes (.class files),splited with [:] On UNIX systems, splited with [;]  on Microsoft Windows systems")
	public String classpath;
    @Parameter(names = "-javadocEnable", description =
            "use comments read by javadoc as documentation")
    public boolean javadocEnable;
    @Parameter(names = "-defaultMaxLength", description =
            "default value for annotation @max_length")
    public int defaultMaxLength = 256;
    @Parameter(names = "-errmsgMaxLength", description =
            " max length for output error message buffer of  each service port")
    public int errmsgMaxLength = 256;
    @Parameter(names = "-erpcProxy", description =
            "generate for eRPC proxy service,default:true")
    public boolean erpcProxy = true;
    @Parameter(names = "-excludeFields", description =
            "exclude fields of struct class name,such as '$classname1:user,age;$classname2:phone'",converter=MapConverter.class)
    public Map<String, String> excludeFields;
}
